package hrms.service;

import hrms.dao.AccountMapper;
import hrms.entity.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("AccountService")
public class AccountService {
    @Autowired
    AccountMapper accountMapper;

    public Account findByPhone(Account account){
        return accountMapper.findByPhone(account.getPhone());
    }
    public Account findAccountById(Integer id) {
        return accountMapper.findAccountById(id);
    }
    public void addAccount(Account account){
        accountMapper.insertAccount(account);
    }
    public Integer findStaffIdById(Integer id){
        return accountMapper.findStaffIdById(id);
    }
}
